<template>
	<view v-if="isLoaded">
		<li-report
			height="800"
			:param.sync="param"
			:reportData="tableData"
			isTab
			:tabList="[
				{
					text: `消费统计`,
					columns: [
						{
							name: `name`,
							label: `统计项`,
							fixed: true
						},
						{
							name: `amount`,
							label: `金额`,
							fixed: true
						}
					],
					reportData: tableData.comsumeSummary
				},
				{
					text: `商品大类统计`,
					columns: [
						{
							name: `name`,
							label: `名称`,
							fixed: true
						},
						{
							name: `count`,
							label: `数量`,
							fixed: true,
							sorter: true
						},
						{
							name: `amount`,
							label: `金额`,
							fixed: true,
							sorter: true
						}
					],
					reportData: tableData.bigCategorySummary
				},
				{
					text: `商品小类统计`,
					columns: [
						{
							name: `name`,
							label: `名称`,
							fixed: true,
							sorter: true
						},
						{
							name: `count`,
							label: `数量`,
							fixed: true,
							sorter: true
						},
						{
							name: `amount`,
							label: `金额`,
							fixed: true,
							sorter: true
						}
					],
					reportData: tableData.smallCategorySummary
				},
				{
					text: `收银统计`,
					columns: [
						{
							name: `name`,
							label: `名称`,
							fixed: true
						},
						{
							name: `count`,
							label: `数量`,
							fixed: true
						},
						{
							name: `amount`,
							label: `金额`,
							fixed: true
						}
					],
					reportData: tableData.incomeSummary
				},
				{
					text: `会员操作统计`,
					columns: [
						{
							name: `name`,
							label: `名称`,
							fixed: true
						},

						{
							name: `amount`,
							label: `金额`,
							fixed: true,
							sorter: true
						}
					],
					reportData: tableData.userSummary
				}
			]"
		/>
	</view>
</template>

<script>
import date from '@/utils/date';
import LiReportMixin from '../../../mixins/liReportMixin.js';
import { GetBusinessDaySummary } from '../../../common/modules/report.js';

export default {
	mixins: [LiReportMixin],
	data() {
		return {
			navTitle: '营业日汇总',
			reportFn: GetBusinessDaySummary,
			param: {
				dataTimeRange: [date.getDate(0), date.getDate(0)]
			}
		};
	},
	methods: {}
};
</script>
